define(['app'], function(app) {
	'use strict';

	var controller = function controller($scope, Bbs, $sce,GoPage, GoDialog,Auth) {
		//页面离开，分享关闭
		$scope.$on('$ionicView.afterEnter', function() {
			//动态设置高度
			GoPage.init_top($scope);
			$scope.loadIframe();
		}, false);
		$scope.loadIframe = function() {
			var info = Auth.get_loginInfo();
			var url = HTTP_URL_BBS + "?session=" + info.user_id;//user_id就是session
			$scope.myURL = $sce.trustAsResourceUrl(url);
		};
	}

	controller.$inject = ['$scope', 'Bbs', '$sce', 'GoPage', "GoDialog",'Auth'];

	return app.registerController("bbsctrl",controller);
});